//
//  CouponManager.h
//  EasyToo
//
//  Created by zhengzhe on 13-8-25.
//
//

#import <Foundation/Foundation.h>
#import "ServerCommunicationDelegate.h"

@protocol CouponManagerDelegate <NSObject>
@optional

- (void)getMerchantsFinish:(BOOL)isSuccess
             merchantArray:(NSMutableArray*)merchantArray;

- (void)getShopsFinish:(BOOL)isSuccess
             shopArray:(NSMutableArray*)shopArray;

- (void)getCouponsFinish:(BOOL)isSuccess
             couponArray:(NSMutableArray*)couponArray;

//发送优惠券
- (void)sendCouponFinish:(BOOL)isSuccess;

@end


@interface CouponManager : NSObject <ServerCommunicationDelegate>

@property (nonatomic, assign) id<CouponManagerDelegate> delegate;

+ (CouponManager*)shareManager;

//获取所有商家
- (void)getMerchants;

//获取某个商家的分店
- (void)getShops:(NSString*)merchantId;

//获取某个分店的优惠券
- (void)getCoupons:(NSString*)shopId;

//搜索优惠券
- (void)searchCouponList;

//发送优惠券
- (void)sendCoupon:(NSString*)couponId
            telNum:(NSString*)telNum;
@end
